package com.example.leetcode.graph;

import com.example.leetcode.graph.common.GraphUtils;

class Solution1020 {
    public int numEnclaves(int[][] grid) {
        return GraphUtils.numEnclaves(grid);
    }
}

public class leetcode1020 {
    public static void main(String[] args) {
        Solution1020 solution1020 = new Solution1020();
        int[][] grid = {{0, 0, 0, 0}, {1, 0, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}};
        System.out.println(solution1020.numEnclaves(grid));

        int[][] grid1 = {{0, 1, 1, 0}, {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0, 0, 0}};
        System.out.println(solution1020.numEnclaves(grid1));
    }
}
